home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / ispell40.lha / ispell-4.0 / good.c < prev    next >
C/C++ Source or Header  |  1993-04-15  |  1KB  |  47 lines

  1. /* Copyright (C) 1990, 1993 Free Software Foundation, Inc.
  2.  
  3.    This file is part of GNU ISPELL.
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2, or (at your option)
  8.    any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #include <stdio.h>
  20. #include <fcntl.h>
  21. #include "ispell.h"
  22. #include "hash.h"
  23. #include "good.h"
  24.  
  25. int
  26. good (w, len, alllower)
  27.   char *w;
  28.   int len, alllower;
  29. {
  30.   if (len >= MAX_WORD_LEN - 5)
  31.     return (0);
  32.  
  33.   if (lookup (w))
  34.     return (1);
  35.  
  36.   if (len == 1)
  37.     return (1);
  38.  
  39.   if (len < 4)
  40.     return (p_lookup (w, alllower));
  41.  
  42.   if (sufcheck (w, len))
  43.     return (1);
  44.  
  45.   return (p_lookup (w, alllower));
  46. }
  47.